#!/bin/bash

rm abc.jar
if [ -e target ]; then
	rm -rf target
fi

mkdir target

# compile
javac  src/*.java -d target

# package jar add .class, .properties 
# c=create v=verbose f= specifies the jar file name, e=executable jar
# http://stackoverflow.com/questions/18146361/how-to-create-jar-file-with-package-structure
jar cvfe abc.jar \
Main \
-C target . \
META-INF/services/*


# execute this jar
java -jar abc.jar


